﻿Public Class frmPresentation
#Region "<< -Attributes- >>"
    Private _Count As Integer = 0
    Private _MessageBox As frmMessage = New frmMessage()
#End Region

#Region "<< -Events- >>"
    Private Sub frmPresentation_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Try
            ProgressBar.Value = 0
            ProgressBar.Maximum = 100
            Timer1.Enabled = True
            Timer1.Interval = 500
            Timer1.Start()
        Catch ex As Exception
            _MessageBox.ShowMessage("Excepción", ex.Message, frmMessage.MessageType.Error_, frmMessage.MessageButtons.Ok)
        End Try
    End Sub

    Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
        Dim wFrm As frmLogin = Nothing

        Try
            If _Count < 100 Then
                _Count += 20
                If (_Count < 100) Then
                    ProgressBar.Value = _Count
                Else
                    ProgressBar.Value = 99
                    Timer1.Enabled = False
                    Timer1.Stop()
                    Me.Hide()
                    wFrm = New frmLogin
                    wFrm.ShowDialog()
                End If
            End If
        Catch ex As Exception
            _MessageBox.ShowMessage("Excepción", ex.Message, frmMessage.MessageType.Error_, frmMessage.MessageButtons.Ok)
        End Try
    End Sub
#End Region
    
End Class